<template>
  <div>
    <div>
      {{ myuser.name }}--{{ myuser.age }}--{{ myuser.sex }}
    </div>
    <button @click="editUserInfo">改变</button>
  </div>
</template>

<script lang='ts'>
export default {
  name: 'vue',
}
</script>

<script lang='ts' setup>
import { ref, h, type Ref, isRef, reactive, isReactive, readonly, isReadonly, toRef, toRefs, unref, isProxy } from 'vue';
import type { Iuser } from './demo1.vue';

const { user } = defineProps<{
  user: Iuser
}>()
console.log(user);

const myuser = ref(user)
console.log(myuser)

const editUserInfo = () => {
  myuser.value.age = 20
}
</script>

<style lang='scss'></style>
